<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" >
        function fun() {
            alert("无参函数fun()被调用了");
        }
        fun();

        function fun2(a, b) {
            alert("有参函数fun2被调用了 a = " + a + ", b = " + b);
        }
        fun2(12, "abc");

        //带返回值
        function sum(num1, num2) {
            return num1 + num2;
        }
        alert(sum(100, 50));
    </script>
</head>
<body>
    
</body>
</html>